package com.seari.bean;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @ClassName QuickReportBean
 * @Description TODO
 * @Author LANDSUS
 * @Date 2021/5/25 14:43
 * @Version 1.0
 */
public class QuickReportBean extends BaseBean{

    /**
	 * 
	 */
	private static final long serialVersionUID = 7229266864439169519L;

	/**
     * id
     */
    private String id;

    /**
     * 故障日期
     */
    private String accidentDate;

    /**
     * 故障时间
     */
    private String accidentTime;

    /**
     * 故障线路
     */
    private Integer accidentLine;

    /**
     * 故障地点
     */
    private String accidentLocation;

    /**
     * 紧急程度
     */
    private String accidentEmergency;

    /**
     * 事发情况
     */
    private String accidentDetail;

    /**
     * 续报
     */
    private String accidentRemark;

    /**
     * 操作时间
     */
    private Date operateTime;

    /**
     * 操作人员
     */
    private String operatePerson;

    /**
     * 是否删除
     */
    private Boolean removed;

    /**
     *
     */
    private Integer ext1;

    /**
     *
     */
    private Integer ext2;

    /**
     *
     */
    private Integer ext3;

    /**
     *
     */
    private Integer accidentActive;

    /**
     * 故障标题
     */
    private String accidentTitle;

    /**
     * 故障类型
     */
    private String accidentType;

    /**
     * 故障源
     */
    private String accidentSource;

    /**
     * 解析过得续报
     */
    private List<Map<String,Object>> parseRemark;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAccidentDate() {
        return accidentDate;
    }

    public void setAccidentDate(String accidentDate) {
        this.accidentDate = accidentDate;
    }

    public String getAccidentTime() {
        return accidentTime;
    }

    public void setAccidentTime(String accidentTime) {
        this.accidentTime = accidentTime;
    }

    public Integer getAccidentLine() {
        return accidentLine;
    }

    public void setAccidentLine(Integer accidentLine) {
        this.accidentLine = accidentLine;
    }

    public String getAccidentLocation() {
        return accidentLocation;
    }

    public void setAccidentLocation(String accidentLocation) {
        this.accidentLocation = accidentLocation;
    }

    public String getAccidentEmergency() {
        return accidentEmergency;
    }

    public void setAccidentEmergency(String accidentEmergency) {
        this.accidentEmergency = accidentEmergency;
    }

    public String getAccidentDetail() {
        return accidentDetail;
    }

    public void setAccidentDetail(String accidentDetail) {
        this.accidentDetail = accidentDetail;
    }

    public String getAccidentRemark() {
        return accidentRemark;
    }

    public void setAccidentRemark(String accidentRemark) {
        this.accidentRemark = accidentRemark;
    }

    public Date getOperateTime() {
        return operateTime;
    }

    public void setOperateTime(Date operateTime) {
        this.operateTime = operateTime;
    }

    public String getOperatePerson() {
        return operatePerson;
    }

    public void setOperatePerson(String operatePerson) {
        this.operatePerson = operatePerson;
    }

    public Boolean getRemoved() {
        return removed;
    }

    public void setRemoved(Boolean removed) {
        this.removed = removed;
    }

    public Integer getExt1() {
        return ext1;
    }

    public void setExt1(Integer ext1) {
        this.ext1 = ext1;
    }

    public Integer getExt2() {
        return ext2;
    }

    public void setExt2(Integer ext2) {
        this.ext2 = ext2;
    }

    public Integer getExt3() {
        return ext3;
    }

    public void setExt3(Integer ext3) {
        this.ext3 = ext3;
    }

    public Integer getAccidentActive() {
        return accidentActive;
    }

    public void setAccidentActive(Integer accidentActive) {
        this.accidentActive = accidentActive;
    }

    public String getAccidentTitle() {
        return accidentTitle;
    }

    public void setAccidentTitle(String accidentTitle) {
        this.accidentTitle = accidentTitle;
    }

    public String getAccidentType() {
        return accidentType;
    }

    public void setAccidentType(String accidentType) {
        this.accidentType = accidentType;
    }

    public String getAccidentSource() {
        return accidentSource;
    }

    public void setAccidentSource(String accidentSource) {
        this.accidentSource = accidentSource;
    }

    public List<Map<String, Object>> getParseRemark() {
        return parseRemark;
    }

    public void setParseRemark(List<Map<String, Object>> parseRemark) {
        this.parseRemark = parseRemark;
    }

    @Override
    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(" 紧急程度:").append(getAccidentEmergency()).append("，事件日期：").append(getAccidentDate())
                .append("，事件概述:").append(getAccidentDetail());
        if(getParseRemark() != null && getParseRemark().size() > 0){
            for (int i = 0 ; i < getParseRemark().size(); i++) {
                if(i==0){
                    stringBuilder.append("\n");
                }
                stringBuilder.append("    事件续报"+(i+1)+": ").append(getParseRemark().get(i).get("value"));
            }
        }
        return stringBuilder.toString();
    }
}
